<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Signals</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="prev" href="gtk-Feature-Test-Macros.html" title="Version Information">
<link rel="next" href="gtk-Types.html" title="Types">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk-Feature-Test-Macros.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
<td><a accesskey="n" href="gtk-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk-Signals.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk-Signals.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk-Signals"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk-Signals.top_of_page"></a>Signals</span></h2>
<p>Signals — Object methods and callbacks</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk-Signals.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

#define             <a class="link" href="gtk-Signals.html#GTK-SIGNAL-OFFSET:CAPS" title="GTK_SIGNAL_OFFSET">GTK_SIGNAL_OFFSET</a>
enum                <a class="link" href="gtk-Signals.html#GtkSignalRunType" title="enum GtkSignalRunType">GtkSignalRunType</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gtk-Signals.html#gtk-signal-new" title="gtk_signal_new ()">gtk_signal_new</a>                      (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Signals.html#GtkSignalRunType" title="enum GtkSignalRunType"><span class="type">GtkSignalRunType</span></a> signal_flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> function_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> marshaller</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_val</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_args</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gtk-Signals.html#gtk-signal-newv" title="gtk_signal_newv ()">gtk_signal_newv</a>                     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Signals.html#GtkSignalRunType" title="enum GtkSignalRunType"><span class="type">GtkSignalRunType</span></a> signal_flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> function_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> marshaller</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_val</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_args</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> *args</code></em>);
#define             <a class="link" href="gtk-Signals.html#gtk-signal-lookup" title="gtk_signal_lookup()">gtk_signal_lookup</a>                   (name,
                                                         object_type)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-name" title="gtk_signal_name()">gtk_signal_name</a>                     (signal_id)
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-emit" title="gtk_signal_emit ()">gtk_signal_emit</a>                     (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-emit-by-name" title="gtk_signal_emit_by_name ()">gtk_signal_emit_by_name</a>             (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-emitv" title="gtk_signal_emitv ()">gtk_signal_emitv</a>                    (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkArg" title="struct GtkArg"><span class="type">GtkArg</span></a> *args</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-emitv-by-name" title="gtk_signal_emitv_by_name ()">gtk_signal_emitv_by_name</a>            (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkArg" title="struct GtkArg"><span class="type">GtkArg</span></a> *args</code></em>);
#define             <a class="link" href="gtk-Signals.html#gtk-signal-emit-stop" title="gtk_signal_emit_stop()">gtk_signal_emit_stop</a>                (object,
                                                         signal_id)
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-emit-stop-by-name" title="gtk_signal_emit_stop_by_name ()">gtk_signal_emit_stop_by_name</a>        (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
#define             <a class="link" href="gtk-Signals.html#gtk-signal-connect" title="gtk_signal_connect()">gtk_signal_connect</a>                  (object,
                                                         name,
                                                         func,
                                                         func_data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-connect-after" title="gtk_signal_connect_after()">gtk_signal_connect_after</a>            (object,
                                                         name,
                                                         func,
                                                         func_data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-connect-object" title="gtk_signal_connect_object()">gtk_signal_connect_object</a>           (object,
                                                         name,
                                                         func,
                                                         slot_object)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-connect-object-after" title="gtk_signal_connect_object_after()">gtk_signal_connect_object_after</a>     (object,
                                                         name,
                                                         func,
                                                         slot_object)
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>              <a class="link" href="gtk-Signals.html#gtk-signal-connect-full" title="gtk_signal_connect_full ()">gtk_signal_connect_full</a>             (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkCallbackMarshal" title="GtkCallbackMarshal ()"><span class="type">GtkCallbackMarshal</span></a> unsupported</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> object_signal</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> after</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-connect-while-alive" title="gtk_signal_connect_while_alive ()">gtk_signal_connect_while_alive</a>      (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *alive_object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk-Signals.html#gtk-signal-connect-object-while-alive" title="gtk_signal_connect_object_while_alive ()">gtk_signal_connect_object_while_alive</a>
                                                        (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *alive_object</code></em>);
#define             <a class="link" href="gtk-Signals.html#gtk-signal-disconnect" title="gtk_signal_disconnect()">gtk_signal_disconnect</a>               (object,
                                                         handler_id)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-disconnect-by-func" title="gtk_signal_disconnect_by_func()">gtk_signal_disconnect_by_func</a>       (object,
                                                         func,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-disconnect-by-data" title="gtk_signal_disconnect_by_data()">gtk_signal_disconnect_by_data</a>       (object,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-block" title="gtk_signal_handler_block()">gtk_signal_handler_block</a>            (object,
                                                         handler_id)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-block-by-func" title="gtk_signal_handler_block_by_func()">gtk_signal_handler_block_by_func</a>    (object,
                                                         func,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-block-by-data" title="gtk_signal_handler_block_by_data()">gtk_signal_handler_block_by_data</a>    (object,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-unblock" title="gtk_signal_handler_unblock()">gtk_signal_handler_unblock</a>          (object,
                                                         handler_id)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-unblock-by-func" title="gtk_signal_handler_unblock_by_func()">gtk_signal_handler_unblock_by_func</a>  (object,
                                                         func,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-unblock-by-data" title="gtk_signal_handler_unblock_by_data()">gtk_signal_handler_unblock_by_data</a>  (object,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-pending" title="gtk_signal_handler_pending()">gtk_signal_handler_pending</a>          (object,
                                                         signal_id,
                                                         may_be_blocked)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-handler-pending-by-func" title="gtk_signal_handler_pending_by_func()">gtk_signal_handler_pending_by_func</a>  (object,
                                                         signal_id,
                                                         may_be_blocked,
                                                         func,
                                                         data)
#define             <a class="link" href="gtk-Signals.html#gtk-signal-default-marshaller" title="gtk_signal_default_marshaller">gtk_signal_default_marshaller</a>
</pre>
</div>
<div class="refsect1">
<a name="gtk-Signals.description"></a><h2>Description</h2>
<p>
The GTK+ signal system merely proxies the GLib signal system now. For future
usage, direct use of the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html">GSignal</a> API is recommended, this avoids significant
performance hits where <a class="link" href="gtk-Types.html#GtkArg" title="struct GtkArg"><span class="type">GtkArg</span></a> structures have to be converted into <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>s.
</p>
<div class="refsect2">
<a name="id546977"></a><h3>What are signals?</h3>
<p>
Signals are a way to get notification when something happens
and to customize object behavior according to the
user's needs.
Every <em class="wordasword">signal</em> is uniquely identified by a name,
"class_name::signal_name", where signal_name might be something like
"clicked" and class_name might be "GtkButton".  Note that some other class
may also define a "clicked" callback, so long as it doesn't derive from
<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<p>
When they are created, they are also assigned a unique positive integer,
the signal id (1 is the first signal id- 0 is used to flag an error).
Each is also tied to an array of types that describes
the prototype of the function pointer(s) (handlers) you may
connect to the signal.  Finally, every signal has
a default handler that is given by a function pointer
in its class structure:  it is run by default whenever the
signal is emitted.  (It is possible that a signal will
be emitted and a user-defined handler will prevent the default handler
from being run.)
</p>
<p>
Signals are used by everyone, but they are only
created on a per class basis -- so you should not call
call <a class="link" href="gtk-Signals.html#gtk-signal-new" title="gtk_signal_new ()"><code class="function">gtk_signal_new()</code></a> unless you are writing
a new <a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> type.  However, if you want to make a new signal
for an existing type, you may use <code class="function">gtk_object_class_user_signal_new()</code>
to create a signal that doesn't correspond to a class's builtin
methods.
</p>
</div>
<hr>
<div class="refsect2">
<a name="id577645"></a><h3>How are signals used?</h3>
<p>
There are two basic actions in the signal handling game.
If you want notification of an event, you must <span class="emphasis"><em>connect</em></span>
a function pointer and a data pointer to that signal;  the data pointer
will be passed as the last argument to the function (so long as you
are using the default marshalling functions).
You will receive a connection id, a unique positive integer
corresponding to that attachment.
</p>
<p>
Functions that want to notify the user of certain actions,
<span class="emphasis"><em>emit</em></span> signals.
</p>
</div>
<hr>
<div class="refsect2">
<a name="id577670"></a><h3>Basic Terminology</h3>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">signal</span></p></td>
<td><p>A class method, e.g. GtkButton::clicked.
More precisely it is a unique class-branch/signal-name pair.
This means you may not define a signal handler for a class which
derives from <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> that is called clicked,
but it is okay to share signals names if they are separate in
the class tree.
</p></td>
</tr>
<tr>
<td><p><span class="term">default handler</span></p></td>
<td><p>The object's internal method which is invoked
when the signal is emitted.</p></td>
</tr>
<tr>
<td><p><span class="term">user-defined handler</span></p></td>
<td>
<p>A function pointer and data connected
to a signal (for a particular object).</p>
<p>There are really two types: those which are connected
normally, and those which are connected by one
of the connect_after functions.  The connect_after handlers
are always run after the default handler.</p>
<p>Many toolkits refer to these as <em class="wordasword">callbacks</em>.</p>
</td>
</tr>
<tr>
<td><p><span class="term">emission</span></p></td>
<td><p>the whole process of emitting a signal,
including the invocation of all
the different handler types mentioned above.</p></td>
</tr>
<tr>
<td><p><span class="term">signal id</span></p></td>
<td><p>The unique positive (nonzero) integer
used to identify a signal.  It can be used instead of
a name to many functions for a slight performance
improvement.</p></td>
</tr>
<tr>
<td><p><span class="term">connection id</span></p></td>
<td><p>The unique positive (nonzero) integer
used to identify the connection of a user-defined handler
to a signal.  Notice that it is allowed to connect the
same function-pointer/user-data pair twice, so
there is no guarantee that a function-pointer/user-data
maps to a unique connection id.
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="id602458"></a><h3>A brief note on how they work.</h3>
<p>
The functions responsible for translating an array of <a href="gtk-Types.html#GtkArg"><span class="type">GtkArgs</span></a>
to your C compiler's normal semantics are called Marshallers.
They are identified by
gtk_marshal_<em class="replaceable"><code>return_value</code></em>__<em class="replaceable"><code>parameter_list</code></em>()
for example a C function returning a gboolean and taking a gint
can be invoked by using <code class="function">gtk_marshal_BOOL__INT()</code>.
Not all possibly combinations of return/params are available,
of course, so if you are writing a <a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> with parameters
you might have to write a marshaller.
</p>
</div>
</div>
<div class="refsect1">
<a name="gtk-Signals.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GTK-SIGNAL-OFFSET:CAPS"></a><h3>GTK_SIGNAL_OFFSET</h3>
<pre class="programlisting">#define GTK_SIGNAL_OFFSET	                      G_STRUCT_OFFSET
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GTK_SIGNAL_OFFSET</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Use in place of <code class="function"><code class="function">offsetof()</code></code>, which is used if it exists.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSignalRunType"></a><h3>enum GtkSignalRunType</h3>
<pre class="programlisting">typedef enum {
  GTK_RUN_FIRST      = G_SIGNAL_RUN_FIRST,
  GTK_RUN_LAST       = G_SIGNAL_RUN_LAST,
  GTK_RUN_BOTH       = (GTK_RUN_FIRST | GTK_RUN_LAST),
  GTK_RUN_NO_RECURSE = G_SIGNAL_NO_RECURSE,
  GTK_RUN_ACTION     = G_SIGNAL_ACTION,
  GTK_RUN_NO_HOOKS   = G_SIGNAL_NO_HOOKS
} GtkSignalRunType;
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GtkSignalRunType</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
These configure the signal's emission.  They control
whether the signal can be emitted recursively on an object
and
whether to run the default method before or after the user-defined handlers.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">GTK_RUN_FIRST</span></p></td>
<td><p>Run the default handler before the connected user-defined
handlers.
</p></td>
</tr>
<tr>
<td><p><span class="term">GTK_RUN_LAST</span></p></td>
<td><p>Run the default handler after the connected
user-defined handlers.
(Handlers registered as "after" always run after the default handler though)
</p></td>
</tr>
<tr>
<td><p><span class="term">GTK_RUN_BOTH</span></p></td>
<td><p>Run the default handler twice,
once before the user-defined handlers,
and
once after.
</p></td>
</tr>
<tr>
<td><p><span class="term">GTK_RUN_NO_RECURSE</span></p></td>
<td>
<p>Whether to prevent a handler or hook
from reemitting the signal from within itself.
Attempts to
emit the signal while it is running will result in the signal
emission being restarted once it is done with the current processing.
</p>
<p>
You must be
careful to avoid having two handlers endlessly reemitting signals,
<code class="function">gtk_signal_n_emissions()</code> can be helpful.
</p>
</td>
</tr>
<tr>
<td><p><span class="term">GTK_RUN_ACTION</span></p></td>
<td><p>The signal is an action you can
invoke without any particular setup or cleanup.
The signal is treated no differently, but some
other code can determine if the signal is appropriate to
delegate to user control.  For example, key binding sets
only allow bindings of ACTION signals to keystrokes.
</p></td>
</tr>
<tr>
<td><p><span class="term">GTK_RUN_NO_HOOKS</span></p></td>
<td><p>This prevents the connection of emission hooks
to the signal.
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-new"></a><h3>gtk_signal_new ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_signal_new                      (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Signals.html#GtkSignalRunType" title="enum GtkSignalRunType"><span class="type">GtkSignalRunType</span></a> signal_flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> function_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> marshaller</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_val</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_args</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_new</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-new"><code class="function">g_signal_new()</code></a> instead.</p>
</div>
<p>
Creates a new signal type.  (This is usually done in the
class initializer.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the event name for the signal, e.g. "clicked".</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_flags</code></em> :</span></p></td>
<td>a combination of <span class="type">GTK_RUN</span> flags
specifying detail of when the default handler is to be invoked.
You should at least specify <span class="type">GTK_RUN_FIRST</span>
or <span class="type">GTK_RUN_LAST</span>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type of object this signal pertains to.
It will also pertain to derivers of this type automatically.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>function_offset</code></em> :</span></p></td>
<td>How many bytes the function pointer is in
the class structure for this type.  Used to invoke a class
method generically.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
<td>the function to translate between an array
of GtkArgs and the native calling convention.  Usually they
are identified just by the type of arguments they take:
for example, <code class="function">gtk_marshal_BOOL__STRING()</code> describes a marshaller
which takes a string and returns a boolean value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>return_val</code></em> :</span></p></td>
<td>the type of return value, or <span class="type">GTK_TYPE_NONE</span> for a signal
without a return value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_args</code></em> :</span></p></td>
<td>the number of parameter the handlers may take.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the signal id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-newv"></a><h3>gtk_signal_newv ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_signal_newv                     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Signals.html#GtkSignalRunType" title="enum GtkSignalRunType"><span class="type">GtkSignalRunType</span></a> signal_flags</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> function_offset</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#GSignalCMarshaller"><span class="type">GSignalCMarshaller</span></a> marshaller</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_val</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_args</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> *args</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_newv</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-newv"><code class="function">g_signal_newv()</code></a> instead.</p>
</div>
<p>
Creates a new signal type.  (This is usually done in a
class initializer.)
</p>
<p>
This function take the types as an array, instead of a list
following the arguments.  Otherwise the same as <a class="link" href="gtk-Signals.html#gtk-signal-new" title="gtk_signal_new ()"><code class="function">gtk_signal_new()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal to create.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_flags</code></em> :</span></p></td>
<td>see <a class="link" href="gtk-Signals.html#gtk-signal-new" title="gtk_signal_new ()"><code class="function">gtk_signal_new()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type of <a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> to associate the signal with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>function_offset</code></em> :</span></p></td>
<td>how many bytes the function pointer is in
the class structure for this type.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>return_val</code></em> :</span></p></td>
<td>the type of the return value, or <span class="type">GTK_TYPE_NONE</span> if
you don't want a return value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_args</code></em> :</span></p></td>
<td>the number of parameters to the user-defined handlers.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td>an array of <a class="link" href="gtk-Types.html#GtkType" title="GtkType"><span class="type">GtkType</span></a>s, describing the prototype to
the callbacks.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the signal id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-lookup"></a><h3>gtk_signal_lookup()</h3>
<pre class="programlisting">#define             gtk_signal_lookup(name,object_type)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_lookup</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-lookup"><code class="function">g_signal_lookup()</code></a> instead.</p>
</div>
<p>
Given the name of the signal and the type of object it connects
to, get the signal's identifying integer.  Emitting the signal
by number is somewhat faster than using the name each time.
</p>
<p>
It also tries the ancestors of the given type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the signal's name, e.g. clicked.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
<td>the type that the signal operates on, e.g. <span class="type">GTK_TYPE_BUTTON</span>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the signal's identifying number, or 0 if no signal was found.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-name"></a><h3>gtk_signal_name()</h3>
<pre class="programlisting">#define             gtk_signal_name(signal_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_name</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-name"><code class="function">g_signal_name()</code></a> instead.</p>
</div>
<p>
Given the signal's identifier, finds its name.
</p>
<p>
Two different signals may have the same name, if they have differing types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the signal's identifying number.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the signal name, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the signal number was invalid.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emit"></a><h3>gtk_signal_emit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_emit                     (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-emit"><code class="function">g_signal_emit()</code></a> instead.</p>
</div>
<p>
Emits a signal.  This causes the default handler and user-defined
handlers to be run.
</p>
<p>
Here is what <a class="link" href="gtk-Signals.html#gtk-signal-emit" title="gtk_signal_emit ()"><code class="function">gtk_signal_emit()</code></a> does:
</p>
<p>
1.  Calls the default handler and the user-connected handlers.
The default handler will be called first if
<span class="type">GTK_RUN_FIRST</span> is set, and last if <span class="type">GTK_RUN_LAST</span> is set.
</p>
<p>
2.  Calls all handlers connected with the "after" flag set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object that emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the signal identifier.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emit-by-name"></a><h3>gtk_signal_emit_by_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_emit_by_name             (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_by_name</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-emit-by-name"><code class="function">g_signal_emit_by_name()</code></a> instead.</p>
</div>
<p>
Emits a signal.  This causes the default handler and user-connected
handlers to be run.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object that emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emitv"></a><h3>gtk_signal_emitv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_emitv                    (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> signal_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkArg" title="struct GtkArg"><span class="type">GtkArg</span></a> *args</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emitv</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-emitv"><code class="function">g_signal_emitv()</code></a> instead.</p>
</div>
<p>
Emits a signal.  This causes the default handler and user-connected
handlers to be run.  This differs from <a class="link" href="gtk-Signals.html#gtk-signal-emit" title="gtk_signal_emit ()"><code class="function">gtk_signal_emit()</code></a> by taking
an array of GtkArgs instead of using C's varargs mechanism.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object to emit the signal to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the signal identifier.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td>an array of GtkArgs, one for each parameter,
followed by one which is a pointer to the return type.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emitv-by-name"></a><h3>gtk_signal_emitv_by_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_emitv_by_name            (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkArg" title="struct GtkArg"><span class="type">GtkArg</span></a> *args</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emitv_by_name</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-emitv"><code class="function">g_signal_emitv()</code></a> and <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-lookup"><code class="function">g_signal_lookup()</code></a> instead.</p>
</div>
<p>
Emits a signal by name.  This causes the default handler and user-connected
handlers to be run.  This differs from <a class="link" href="gtk-Signals.html#gtk-signal-emit" title="gtk_signal_emit ()"><code class="function">gtk_signal_emit()</code></a> by taking
an array of GtkArgs instead of using C's varargs mechanism.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object to emit the signal to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td>an array of GtkArgs, one for each parameter,
followed by one which is a pointer to the return type.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emit-stop"></a><h3>gtk_signal_emit_stop()</h3>
<pre class="programlisting">#define             gtk_signal_emit_stop(object,signal_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_stop</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-stop-emission"><code class="function">g_signal_stop_emission()</code></a> instead.</p>
</div>
<p>
This function aborts a signal's current emission.
</p>
<p>
It will prevent the default method from running,
if the signal was <span class="type">GTK_RUN_LAST</span> and you connected
normally (i.e. without the "after" flag).
</p>
<p>
It will print a warning if used on a signal which
isn't being emitted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object whose signal handlers you wish to stop.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the signal identifier, as returned by <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-lookup"><code class="function">g_signal_lookup()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-emit-stop-by-name"></a><h3>gtk_signal_emit_stop_by_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_emit_stop_by_name        (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_emit_stop_by_name</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-stop-emission-by-name"><code class="function">g_signal_stop_emission_by_name()</code></a> instead.</p>
</div>
<p>
This function aborts a signal's current emission.
</p>
<p>
It is just like <a class="link" href="gtk-Signals.html#gtk-signal-emit-stop" title="gtk_signal_emit_stop()"><code class="function">gtk_signal_emit_stop()</code></a>
except it will lookup the signal id for you.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object whose signal handlers you wish to stop.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal you wish to stop.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect"></a><h3>gtk_signal_connect()</h3>
<pre class="programlisting">#define             gtk_signal_connect(object,name,func,func_data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect"><code class="function">g_signal_connect()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal for
a particular object.
</p>
<p>
The <span class="type">GtkSignalFunction</span> takes a <a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> as its first parameter.
It will be the same object as the one you're connecting
the hook to.  The <em class="parameter"><code>func_data</code></em> will be passed as the last parameter
to the hook.
</p>
<p>
All else being equal, signal handlers are invoked in the order
connected (see <a class="link" href="gtk-Signals.html#gtk-signal-emit" title="gtk_signal_emit ()"><code class="function">gtk_signal_emit()</code></a> for the other details of
which order things are called in).
</p>
<p>
Here is how one passes an integer as user data,
for when you just want to specify a constant int
as parameter to your function:
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">button_clicked_int</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GtkButton.html">GtkButton</a></span><span class="symbol">*</span><span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> func_data</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"button pressed: %d</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Type-Conversion-Macros.html#GPOINTER-TO-INT:CAPS">GPOINTER_TO_INT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">func_data</span><span class="symbol">));</span>
<span class="cbracket">}</span>
<span class="comment">/* By calling this function, you will make the g_print above</span>
<span class="comment"> * execute, printing the number passed as `to_print'. */</span>
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">attach_print_signal</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="GtkButton.html">GtkButton</a></span><span class="symbol">*</span><span class="normal"> button</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gint</span><span class="normal"> to_print</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">    </span><span class="function"><a href="gtk-Signals.html#gtk-signal-connect">gtk_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_OBJECT</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"clicked"</span><span class="symbol">,</span>
<span class="normal">        </span><span class="function"><a href="gtk-Types.html#GTK-SIGNAL-FUNC:CAPS">GTK_SIGNAL_FUNC</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button_clicked_int</span><span class="symbol">),</span>
<span class="normal">        </span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Type-Conversion-Macros.html#GINT-TO-POINTER:CAPS">GINT_TO_POINTER</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">to_print</span><span class="symbol">));</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object associated with the signal, e.g. if a button
is getting pressed, this is that button.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func_data</code></em> :</span></p></td>
<td>value to pass as to your function (through the marshaller).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-after"></a><h3>gtk_signal_connect_after()</h3>
<pre class="programlisting">#define             gtk_signal_connect_after(object,name,func,func_data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_after</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-after"><code class="function">g_signal_connect_after()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal
so that this handler will be called after the other handlers.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object associated with the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func_data</code></em> :</span></p></td>
<td>value to pass as to your function (through the marshaller).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the unique identifier for this attachment:  the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-object"></a><h3>gtk_signal_connect_object()</h3>
<pre class="programlisting">#define             gtk_signal_connect_object(object,name,func,slot_object)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-swapped"><code class="function">g_signal_connect_swapped()</code></a> instead.</p>
</div>
<p>
This function is for registering a callback that will
call another object's callback.  That is,
instead of passing the object which is responsible
for the event as the first parameter of the callback,
it is switched with the user data (so the object which emits
the signal will be the last parameter, which is where the
user data usually is).
</p>
<p>
This is useful for passing a standard function in as a callback.
For example, if you wanted a button's press to <a class="link" href="GtkWidget.html#gtk-widget-show" title="gtk_widget_show ()"><code class="function">gtk_widget_show()</code></a>
some widget, you could write:
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="gtk-Signals.html#gtk-signal-connect-object">gtk_signal_connect_object</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">button</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"clicked"</span><span class="symbol">,</span><span class="normal"> <a href="GtkWidget.html#gtk-widget-show">gtk_widget_show</a></span><span class="symbol">,</span><span class="normal"> window</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot_object</code></em> :</span></p></td>
<td>the object to pass as the first parameter to func.
(Though it pretends to take an object, you can
really pass any gpointer as the <span class="type">slot_object</span> .)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-object-after"></a><h3>gtk_signal_connect_object_after()</h3>
<pre class="programlisting">#define             gtk_signal_connect_object_after(object,name,func,slot_object)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object_after</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-data"><code class="function">g_signal_connect_data()</code></a> instead, passing
<code class="literal">G_CONNECT_AFTER|G_CONNECT_SWAPPED</code> as <em class="parameter"><code>connect_flags</code></em>.</p>
</div>
<p>
Attaches a signal hook to a signal, passing in an alternate
object as the first parameter, and guaranteeing
that the default handler and all normal
handlers are called first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object associated with the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>slot_object</code></em> :</span></p></td>
<td>the object to pass as the first parameter to <span class="type">func</span>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-full"></a><h3>gtk_signal_connect_full ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="returnvalue">gulong</span></a>              gtk_signal_connect_full             (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk-Types.html#GtkCallbackMarshal" title="GtkCallbackMarshal ()"><span class="type">GtkCallbackMarshal</span></a> unsupported</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> object_signal</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> after</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_full</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-data"><code class="function">g_signal_connect_data()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and user data to a signal with
more control.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal.  For example, a button
in the button press signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data associated with the function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy_func</code></em> :</span></p></td>
<td>function to call when this particular hook is
disconnected.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object_signal</code></em> :</span></p></td>
<td>whether this is an object signal-- basically an "object
signal" is one that wants its user_data and object fields switched,
which is useful for calling functions which operate on another
object primarily.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>after</code></em> :</span></p></td>
<td>whether to invoke the user-defined handler after the signal, or to let
the signal's default behavior preside (i.e. depending on <span class="type">GTK_RUN_FIRST</span>
and <span class="type">GTK_RUN_LAST</span>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-while-alive"></a><h3>gtk_signal_connect_while_alive ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_connect_while_alive      (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *alive_object</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_while_alive</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-object"><code class="function">g_signal_connect_object()</code></a> instead.</p>
</div>
<p>
Attaches a function pointer and another <a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> to a signal.
</p>
<p>
This function takes an object whose "destroy" signal
should be trapped.
That way, you don't have to clean up the
signal handler when you destroy the object.
It is a little less efficient though.
</p>
<p>
(Instead you may call <a class="link" href="gtk-Signals.html#gtk-signal-disconnect-by-data" title="gtk_signal_disconnect_by_data()"><code class="function">gtk_signal_disconnect_by_data()</code></a>, if you want
to explicitly delete all attachments to this object.  This
is perhaps not recommended since it could be confused
with an integer masquerading as a pointer (through <a href="http://library.gnome.org/devel/glib/unstable/glib-Type-Conversion-Macros.html#GINT-TO-POINTER:CAPS"><code class="function">GINT_TO_POINTER()</code></a>).)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object that emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func_data</code></em> :</span></p></td>
<td>pointer to pass to func.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alive_object</code></em> :</span></p></td>
<td>object whose death should cause the handler connection
to be destroyed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-connect-object-while-alive"></a><h3>gtk_signal_connect_object_while_alive ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_signal_connect_object_while_alive
                                                        (<em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> func</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a> *alive_object</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_connect_object_while_alive</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect-object"><code class="function">g_signal_connect_object()</code></a> instead, passing
<code class="literal">G_CONNECT_SWAPPED</code> as <em class="parameter"><code>connect_flags</code></em>.</p>
</div>
<p>
These signal connectors are for signals which refer to objects,
so they must not be called after the object is deleted.
</p>
<p>
Unlike <a class="link" href="gtk-Signals.html#gtk-signal-connect-while-alive" title="gtk_signal_connect_while_alive ()"><code class="function">gtk_signal_connect_while_alive()</code></a>,
this swaps the object and user data, making it suitable for
use with functions which primarily operate on the user data.
</p>
<p>
This function acts just like <a class="link" href="gtk-Signals.html#gtk-signal-connect-object" title="gtk_signal_connect_object()"><code class="function">gtk_signal_connect_object()</code></a> except
it traps the "destroy" signal to prevent you from having to
clean up the handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object associated with the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>function pointer to attach to the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alive_object</code></em> :</span></p></td>
<td>the user data, which must be an object, whose destruction
should signal the removal of this signal.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-disconnect"></a><h3>gtk_signal_disconnect()</h3>
<pre class="programlisting">#define             gtk_signal_disconnect(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handler-disconnect"><code class="function">g_signal_handler_disconnect()</code></a> instead.</p>
</div>
<p>
Destroys a user-defined handler connection.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which the handler pertains to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-disconnect-by-func"></a><h3>gtk_signal_disconnect_by_func()</h3>
<pre class="programlisting">#define             gtk_signal_disconnect_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect_by_func</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-disconnect-by-func"><code class="function">g_signal_handlers_disconnect_by_func()</code></a> instead.</p>
</div>
<p>
Destroys all connections for a particular object, with
the given function-pointer and user-data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function pointer to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data to search for.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-disconnect-by-data"></a><h3>gtk_signal_disconnect_by_data()</h3>
<pre class="programlisting">#define             gtk_signal_disconnect_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_disconnect_by_data</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-disconnect-matched"><code class="function">g_signal_handlers_disconnect_matched()</code></a> instead.</p>
</div>
<p>
Destroys all connections for a particular object, with
the given user-data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data to search for.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-block"></a><h3>gtk_signal_handler_block()</h3>
<pre class="programlisting">#define             gtk_signal_handler_block(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handler-block"><code class="function">g_signal_handler_block()</code></a> instead.</p>
</div>
<p>
Prevents a user-defined handler from being invoked.  All other
signal processing will go on as normal, but this particular
handler will ignore it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal to block.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td>
<td>the connection id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-block-by-func"></a><h3>gtk_signal_handler_block_by_func()</h3>
<pre class="programlisting">#define             gtk_signal_handler_block_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block_by_func</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-block-by-func"><code class="function">g_signal_handlers_block_by_func()</code></a> instead.</p>
</div>
<p>
Prevents a user-defined handler from being invoked, by reference to
the user-defined handler's function pointer and user data.  (It may result in
multiple hooks being blocked, if you've called connect multiple times.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal to block.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function pointer of the handler to block.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data of the handler to block.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-block-by-data"></a><h3>gtk_signal_handler_block_by_data()</h3>
<pre class="programlisting">#define             gtk_signal_handler_block_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_block_by_data</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-block-matched"><code class="function">g_signal_handlers_block_matched()</code></a> instead.</p>
</div>
<p>
Prevents all user-defined handlers with a certain user data from being invoked.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal we want to block.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data of the handlers to block.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-unblock"></a><h3>gtk_signal_handler_unblock()</h3>
<pre class="programlisting">#define             gtk_signal_handler_unblock(object,handler_id)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handler-unblock"><code class="function">g_signal_handler_unblock()</code></a> instead.</p>
</div>
<p>
Undoes a block, by connection id.  Note that undoing a block doesn't
necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal we want to unblock.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>handler_id</code></em> :</span></p></td>
<td>the emission handler identifier, as returned by
<a class="link" href="gtk-Signals.html#gtk-signal-connect" title="gtk_signal_connect()"><code class="function">gtk_signal_connect()</code></a>, etc.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-unblock-by-func"></a><h3>gtk_signal_handler_unblock_by_func()</h3>
<pre class="programlisting">#define             gtk_signal_handler_unblock_by_func(object,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock_by_func</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-unblock-by-func"><code class="function">g_signal_handlers_unblock_by_func()</code></a> instead.</p>
</div>
<p>
Undoes a block, by function pointer and data.
Note that undoing a block doesn't
necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal we want to unblock.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function pointer to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data to search for.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-unblock-by-data"></a><h3>gtk_signal_handler_unblock_by_data()</h3>
<pre class="programlisting">#define             gtk_signal_handler_unblock_by_data(object,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_unblock_by_data</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-unblock-matched"><code class="function">g_signal_handlers_unblock_matched()</code></a> instead.</p>
</div>
<p>
Undoes block(s), to all signals for a particular object
with a particular user-data pointer
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object which emits the signal we want to unblock.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data to search for.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-pending"></a><h3>gtk_signal_handler_pending()</h3>
<pre class="programlisting">#define             gtk_signal_handler_pending(object,signal_id,may_be_blocked)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_pending</code> is deprecated and should not be used in newly-written code. Use <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-has-handler-pending"><code class="function">g_signal_has_handler_pending()</code></a> instead.</p>
</div>
<p>
Returns a connection id corresponding to a given signal id and object.
</p>
<p>
One example of when you might use this is when the arguments
to the signal are difficult to compute.  A class implementor
may opt to not emit the signal if no one is attached anyway,
thus saving the cost of building the arguments.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object to search for the desired user-defined handler.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the number of the signal to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_be_blocked</code></em> :</span></p></td>
<td>whether it is acceptable to return a blocked
handler.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id, if a connection was found.  0 otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-handler-pending-by-func"></a><h3>gtk_signal_handler_pending_by_func()</h3>
<pre class="programlisting">#define             gtk_signal_handler_pending_by_func(object,signal_id,may_be_blocked,func,data)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_handler_pending_by_func</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns a connection id corresponding to a given signal id, object, function
pointer and user data.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object to search for the desired handler.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>signal_id</code></em> :</span></p></td>
<td>the number of the signal to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>may_be_blocked</code></em> :</span></p></td>
<td>whether it is acceptable to return a blocked
handler.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function pointer to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>the user data to search for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the connection id, if a handler was found.  0 otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-signal-default-marshaller"></a><h3>gtk_signal_default_marshaller</h3>
<pre class="programlisting">#define gtk_signal_default_marshaller g_cclosure_marshal_VOID__VOID
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_signal_default_marshaller</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
A marshaller that returns void and takes no extra parameters.
</p>
</div>
</div>
<div class="refsect1">
<a name="gtk-Signals.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="GtkObject.html" title="GtkObject"><span class="type">GtkObject</span></a></span></p></td>
<td><p>The base class for things which emit signals.</p></td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html">GSignal</a></span></p></td>
<td><p>The GLib signal system.</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>